package com.csusm.geo.science.tutor;

import org.json.JSONArray;
import org.json.JSONException;

public class VideoDbHelper {
	public String getLinks(String selLoc) {
		String url = "http://ouyangdev.cs.csusm.edu/GeoTutor/getvideo.php";
		//Get the data from database
		String result = UtilityHelper.getResult(selLoc, url);		
		// paring data
		String vlink = null;
		try {
			JSONArray jArray = new JSONArray(result);
			for (int i = 0; i < jArray.length(); i++) {
				vlink = jArray.getString(i); 
			}
		} catch (JSONException e1) {
			e1.printStackTrace();
		}

		return vlink;
	}
}
